This example shows how
to apply an object filter to select objects and then change the
color property of the selected objects.
In
this example, you learn how to
- Record and save an action macro
- Modify an object using the Properties
palette
- Select objects and use an object selection
filter
- Use Pick First selection
- Play back an action macro
Start Recording an Action
Macro
You start recording actions
on the Action Recorder panel. To display the Action Recorder panel
and to start recording, follow these steps:
- On the ribbon, click the Manage tab.
- On the Action recorder panel, click Record.
Modify Objects Using the
Properties Palette and Object Selection Filter
When working with the
Properties palette, you can control which objects you modify by
applying an object selection filter to the selected objects. Follow
these steps:
- Select the objects in the drawing that
you want to modify and right-click. Click Properties.
- On the Properties palette, in the Objects
drop-down list, select Circles.
- Under the General category, select the
Color field.
- In the Color drop-down list, select Blue.
Stop Recording and Save
an Action Macro
After all the actions
have been recorded, you stop recording and save the recorded actions
to an action macro file. Follow these steps:
- On the Action Recorder panel, click Stop.
- In the Action Macro dialog box, do the
following
- In the Action Macro Command Name box,
enter BlueCircles.
- In the Description box, enter Changes
the color of all selected circles to blue.
- Click OK.
Change the Selection Set
to Use the Pick First Selection Set
With a request for user
input, you are prompted for a value to be entered instead of using
a recorded value when playing back an action macro. In this action
macro, you change the selection set created to use the Pick First
selection. Follow these steps:
- On the Action Recorder panel, click the
title bar to expand the panel.
- In the Action tree, under the Action
Macro node, select the Pickfirst value node and right-click. Click
Use Pick First Set.
Play Back the Action Macro
When you play back the
action macro, you are prompted to select objects if no objects are
selected. To see the results of the action macro, follow these steps:
- Draw some circles and other objects in
the drawing. Change the colors of the objects to colors other than
blue.
- On the Action Recorder panel, on the
Action Macro list, select BlueCircles.
- Click Play.
- In the Action Macro - No Objects Selected
dialog box, click Select Objects and Continue.
- When prompted to select objects, select
the circles and the other objects in the drawing. Press ENTER to
complete object selection.
The circles in the selection
set are changed to the color blue.
- If the Action Macro - Playback Complete
dialog box is displayed, click OK.
Undo the changes made
by the action macro by clicking Undo from the Quick Access toolbar.
Now select some objects in the drawing and playback the BlueCircles
action macro. This time the action macro uses the Pick First selection
and you are not prompted to select the objects in the drawing when the
action macro is played back.
CommandsACTRECORD
Starts
the Action Recorder.
ACTSTOP
Stops
the Action Recorder and provides the option of saving the recorded actions
to an action macro file.
PROPERTIES
Controls properties
of existing objects.
RIBBON
System VariablesPICKFIRST
Controls whether you
select objects before (noun-verb selection) or after you issue a
command.